import json
import random

data = {"type": "item01", "group": "shop-1", "date": "2023-10-25", "packageType": "0", "totalNum": "1000"}

data_list = []

for idx, g in enumerate(['商家01', '商家02', '商家03', ]):
    for i in ('item01', 'item02', 'item03'):
        for v in range(30):
            if idx == 0:
                value = random.randint(100, 200)
            elif idx == 1:
                value = random.randint(500, 600)
            else:
                value = random.randint(100, 3000)
            data_list.append(
                {"type": i, "group": g, "date": "2023-10-{}".format(v + 1), "packageType": "0", "totalNum": value})

data_json = json.dumps(data_list)

print(data_json)
